.admin-shell .settings-category-picker,
.admin-shell .grant-selection-label {
    display: none;
}

@media (max-width: 767.98px) {
    .admin-shell {
        flex-direction: column;
        min-width: 0;
    }

    .admin-shell .admin-content {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 1rem 0.75rem;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    .admin-shell .content-header,
    .admin-shell .setting-card,
    .admin-shell .setting-row,
    .admin-shell .edit-row,
    .admin-shell .form-row,
    .admin-shell .actions-panel,
    .admin-shell .impact-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .admin-shell .content-header {
        margin-bottom: 1rem;
    }

    .admin-shell .settings-tabs {
        display: none;
    }

    .admin-shell .settings-category-picker {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        margin-bottom: 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--color-text-strong);
    }

    .admin-shell .settings-category-picker .form-input {
        max-width: none;
        min-height: 44px;
    }

    .admin-shell .setting-card.indented {
        margin-left: 0.5rem;
    }

    .admin-shell .setting-control,
    .admin-shell .setting-control.wide,
    .admin-shell .setting-info,
    .admin-shell .form-group {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    .admin-shell .admin-content .setting-control .form-input,
    .admin-shell .setting-control .time-text-input,
    .admin-shell .setting-select,
    .admin-shell .setting-input,
    .admin-shell .input-suffix-wrapper,
    .admin-shell .input-prefix-wrapper,
    .admin-shell .radio-group,
    .admin-shell .scope-filter .form-select,
    .admin-shell .form-group .date-text-input,
    .admin-shell .form-group .time-text-input,
    .admin-shell .form-group .form-select {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .admin-shell .actions-panel .form-input {
        width: 100%;
        min-width: 0;
    }

    .admin-shell .setting-divider {
        margin-inline: 0.75rem;
    }

    .admin-shell .setting-row,
    .admin-shell .blackout-form {
        padding: 0.85rem 0.75rem;
    }

    .admin-shell .header-actions,
    .admin-shell .toolbar,
    .admin-shell .toolbar-left,
    .admin-shell .toolbar-right,
    .admin-shell .year-bar,
    .admin-shell .edit-actions,
    .admin-shell .form-actions,
    .admin-shell .impact-actions,
    .admin-shell .scope-tabs,
    .admin-shell .surcharge-picker,
    .admin-shell .template-meta,
    .admin-shell .type-name,
    .admin-shell .unlimited-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-shell .toolbar-left,
    .admin-shell .toolbar-right,
    .admin-shell .search-wrapper,
    .admin-shell .search-input,
    .admin-shell .filter-select,
    .admin-shell .emp-move-select {
        width: 100%;
        min-width: 0;
    }

    .admin-shell .search-input {
        padding-right: 3rem;
    }

    .admin-shell .btn-copy {
        margin-left: 0;
    }

    .admin-shell .option-card,
    .admin-shell .template-card,
    .admin-shell .type-card,
    .admin-shell .day-card,
    .admin-shell .blackout-card,
    .admin-shell .dept-display,
    .admin-shell .doc-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .admin-shell .option-info,
    .admin-shell .day-info {
        flex-wrap: wrap;
    }

    .admin-shell .option-info,
    .admin-shell .template-info,
    .admin-shell .type-info,
    .admin-shell .day-info,
    .admin-shell .dept-info,
    .admin-shell .type-details,
    .admin-shell .day-details,
    .admin-shell .dept-details,
    .admin-shell .doc-info {
        min-width: 0;
    }

    .admin-shell .option-actions,
    .admin-shell .template-actions,
    .admin-shell .type-actions,
    .admin-shell .day-actions,
    .admin-shell .blackout-actions,
    .admin-shell .dept-actions,
    .admin-shell .doc-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
        margin-left: 0;
        gap: 0.5rem;
    }

    .admin-shell .template-name,
    .admin-shell .emp-name,
    .admin-shell .doc-name {
        white-space: normal;
    }

    .admin-shell .summary-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .admin-shell .summary-card {
        min-width: 0;
        padding: 0.75rem 0.5rem;
    }

    .admin-shell .emp-list .emp-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-shell .order-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }

    .admin-shell .order-buttons .btn-order {
        border: 1px solid var(--color-border-light);
        border-radius: 6px;
    }

    .admin-shell .drag-handle {
        display: none;
    }

    .admin-shell .doc-tag {
        align-self: flex-start;
        max-width: 100%;
    }

    .admin-shell .tag-popover {
        width: min(240px, calc(100vw - 5rem));
        max-height: 60dvh;
        overflow-y: auto;
    }

    .admin-shell .employee-selection-menu {
        min-width: 0;
        max-height: 45dvh;
    }

    .admin-shell .budget-overview-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .admin-shell .budget-overview-table,
    .admin-shell .budget-overview-table tbody,
    .admin-shell .budget-overview-table tr,
    .admin-shell .budget-overview-table td {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: none;
        box-sizing: border-box;
    }

    .admin-shell .budget-overview-table .emp-row,
    .admin-shell .budget-overview-table .dept-subtotal-row {
        margin-bottom: 0.75rem;
        padding: 0.4rem 0.75rem;
        border: 1px solid var(--color-border);
        border-radius: 10px;
        background: var(--color-surface);
    }

    .admin-shell .budget-overview-table .dept-subtotal-row {
        background: var(--color-surface-alt);
    }

    .admin-shell .budget-overview-table td {
        padding: 0.65rem 0;
        background: transparent;
        border-bottom: 1px solid var(--color-border-soft);
    }

    .admin-shell .budget-overview-table td:last-child {
        border-bottom: 0;
    }

    .admin-shell .budget-overview-table td.col-emp {
        position: static;
        min-width: 0;
        max-width: none;
        background: transparent;
    }

    .admin-shell .budget-overview-table td[data-label] {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        white-space: normal;
    }

    .admin-shell .budget-overview-table td[data-label]::before {
        content: attr(data-label);
        flex: 1;
        min-width: 0;
        text-align: left;
        font-size: 0.95rem;
        color: var(--color-text-strong);
    }

    .admin-shell .budget-overview-table :is(.emp-name, .budget-used, .budget-unit, .subtotal-used, .total-used) {
        font-size: 1rem;
    }

    .admin-shell .budget-overview-table .budget-cell {
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .admin-shell .budget-overview-table .dept-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .admin-shell .budget-overview-table .dept-header-row td {
        border-bottom: 0;
    }

    .admin-shell .budget-overview-table .dept-name {
        font-size: 1rem;
    }

    .admin-shell .budget-table-wrapper {
        max-width: 100%;
        overscroll-behavior-x: contain;
    }

    .admin-shell .budget-table .col-emp {
        position: sticky;
        left: 0;
        background: var(--color-surface);
        min-width: 125px;
        max-width: 160px;
        z-index: 1;
    }

    /* Grants are reviewed per employee on a phone, rather than in a wide matrix. */
    .admin-shell .grant-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .admin-shell .grant-table,
    .admin-shell .grant-table tbody,
    .admin-shell .grant-table tr,
    .admin-shell .grant-table td {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: none;
        box-sizing: border-box;
    }

    .admin-shell .grant-table tr {
        border: 1px solid var(--color-border);
        border-radius: 10px;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }

    .admin-shell .grant-table .col-emp {
        position: static;
        min-width: 0;
        max-width: none;
        background: transparent;
    }

    .admin-shell .grant-table .col-check label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 44px;
        cursor: pointer;
    }

    .admin-shell .grant-selection-label {
        display: inline;
    }

    .admin-shell .grant-table td {
        text-align: left;
    }

    .admin-shell .grant-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.35rem;
        font-weight: 600;
        color: var(--color-text-strong);
    }

    .admin-shell .grant-table td:last-child {
        border-bottom: 0;
    }

    .admin-shell .audit-filters {
        flex-direction: column;
    }

    .admin-shell .audit-filters > *,
    .admin-shell .audit-filters .form-input {
        width: 100%;
        max-width: none;
    }

    .admin-shell .audit-row-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .admin-shell .audit-paging {
        flex-wrap: wrap;
    }

    .admin-shell .audit-change-table {
        table-layout: fixed;
    }

    .admin-shell .audit-payload {
        overflow-wrap: anywhere;
    }

    .admin-shell .admin-content button,
    .admin-shell .admin-content a.btn-add,
    .admin-shell .admin-content a.btn-primary,
    .admin-shell .admin-content a.btn-nav,
    .admin-shell .emp-toggle,
    .admin-shell .kind-toggle,
    .admin-shell .channel-check,
    .admin-shell .scope-radios label,
    .admin-shell .form-check,
    .admin-shell .chip {
        min-height: 44px;
    }

    .admin-shell .admin-content :is(.btn-admin-action, .btn-order, .icon-choice, .color-choice, .search-clear),
    .admin-shell .color-input-native {
        min-width: 44px;
        min-height: 44px;
    }
}
