main {
    max-width: 1800px;
}

#devicesSection table {
    min-width: 1180px;
    font-size: clamp(12px, .78vw, 14px);
}

#devicesSection th,
#devicesSection td {
    padding: clamp(9px, .75vw, 14px) clamp(8px, .85vw, 16px);
}

#devicesSection .device-identity {
    min-width: 215px;
}

#devicesSection .actions {
    gap: 5px;
}

#devicesSection .actions button {
    padding: 7px 9px;
    font-size: clamp(11px, .72vw, 13px);
    white-space: nowrap;
}

.tool-actions {
    flex-wrap: wrap;
    min-width: 390px;
    max-width: 520px;
}

.rdp-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.session-actions {
    align-content: flex-start;
    min-width: 145px;
}

#devicesSection td::before {
    display: none;
}

.device-group-row td {
    padding: 9px 14px;
    background: #eaf0f8;
    border-top: 1px solid #d6dfeb;
}

.device-group-header { display: flex; align-items: center; gap: 8px; }
.device-group-header strong { flex: 1; }
.device-group-header button { padding: 6px 9px; }
.group-toggle { min-width: 34px; }

@media (max-width: 1100px) {
    #devicesSection .card {
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    #devicesSection table,
    #devicesSection tbody {
        display: block;
        min-width: 0;
    }

    #devicesSection thead {
        display: none;
    }

    #devicesSection tbody {
        display: grid;
        gap: 14px;
    }

    #devicesSection tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 20px;
        padding: 18px;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 5px 20px #20304012;
    }

    #devicesSection tbody tr.device-group-row { display: block; padding: 0; }
    #devicesSection tbody tr.device-group-row td { padding: 10px 12px; }

    #devicesSection tbody td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    #devicesSection tbody td:first-child,
    #devicesSection tbody td:nth-child(6),
    #devicesSection tbody td:nth-child(7) {
        grid-column: 1 / -1;
    }

    #devicesSection td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #738096;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .tool-actions {
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .session-actions {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    #devicesSection tbody tr {
        grid-template-columns: 1fr;
    }

    #devicesSection tbody td {
        grid-column: 1 / -1;
    }
}
